CC=gcc
CFLAGS=-c -Wall

all: steelnzb

steelnzb: steelnzb_compile
	gcc -l pthread -l xml2 main.o nzb.o filesys.o socket.o nntp.o ydec.o conf.o logger.o crc.o manager.o nzbqueue.o stats.o remotectrl.o -o steelnzb

steelnzb_compile: steelnzb_shared steelnzb_shared_app main

steelnzb_shared: nzb filesys socket nntp ydec conf crc logger

steelnzb_shared_app: manager nzbqueue stats remotectrl

nzb:	
	$(CC) $(CFLAGS) nzb.c -o nzb.o 

filesys:
	$(CC) $(CFLAGS) filesys.c -o filesys.o

socket:
	$(CC) $(CFLAGS) socket.c -o socket.o  

nntp:
	$(CC) $(CFLAGS) nntp.c -o nntp.o 

ydec:
	$(CC) $(CFLAGS) ydec.c -o ydec.o 

conf:
	$(CC) $(CFLAGS) conf.c -o conf.o 

logger:
	$(CC) $(CFLAGS) logger.c -o logger.o

crc:
	$(CC) $(CFLAGS) crc_32.c -o crc.o  

manager:
	$(CC) $(CFLAGS) manager.c -o manager.o

nzbqueue:
	$(CC) $(CFLAGS) nzbqueue.c -o nzbqueue.o

remotectrl:
	$(CC) $(CFLAGS) remotectrl.c -o remotectrl.o

stats:
	$(CC) $(CFLAGS) stats.c -o stats.o    

main:	
	$(CC) $(CFLAGS) main.c -o main.o






	
